﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Data;
using StockMentor;

namespace StockDAL
{
    public class StockStaticFunctions
    {
        private static SqlConnection conn;

        public StockStaticFunctions()
        {
        }
        public static DataTable getProduseStoc
        (
          string prod_denumire,
          string prod_cod,
          short bCant
        ) 
        {
            conn = new SqlConnection();
            conn = Conexiune.InitializeazaCnx(StockDAL.Properties.Settings.Default.dbStockMentorConnectionString);
            Conexiune.DeschideCnx(conn);
  
            StockMentor.CustomProcedures.conn = conn;
            return StockMentor.CustomProcedures.GETPRODUSESTOC(prod_denumire, prod_cod, bCant); 
        }

        public static DataTable getTopProduse
       (
         string data,
         string luna,
         short iStoc0
       )
        {
            conn = new SqlConnection();
            conn = Conexiune.InitializeazaCnx(StockDAL.Properties.Settings.Default.dbStockMentorConnectionString);
            Conexiune.DeschideCnx(conn);

            StockMentor.CustomProcedures.conn = conn;
            return StockMentor.CustomProcedures.GETTOPPRODUSE(data, luna, iStoc0);
        }
    }
}
